package com.common.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzl
 * @since 2022-09-01
 */
@TableName("acl_role")
@ApiModel(value = "Role对象", description = "")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
    private Integer id;

    @ApiModelProperty("角色id")
    @TableId(type = IdType.ASSIGN_ID)
    private String roleId;

    @ApiModelProperty("角色名称")
    private String roleName;

    @ApiModelProperty("角色描述")
    private String remark;

    @ApiModelProperty("逻辑删除 1（true）已删除， 0（false）未删除")
    //表示逻辑删除注解  在字段上加上这个注解再执行BaseMapper的删除方法时，删除方法就会变成修改
    //          value = "" 未删除的值，默认值为0
    //　　　　delval = "" 删除后的值，默认值为1
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMt+8")
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMt+8")
    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;
    @ApiModelProperty("角色的状态 1（true）已删除， 0（false）未删除")
    private Integer state;

}
